using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class EmployeeRoleMap : EntityTypeConfiguration<EmployeeRole>
	{
		public EmployeeRoleMap()
		{
			// Primary Key
			this.HasKey(t => t.EmployeeRoleID);

			// Properties
			// Table & Column Mappings
			this.ToTable("EmployeeRole");
			this.Property(t => t.EmployeeRoleID).HasColumnName("EmployeeRoleID");
			this.Property(t => t.EmployeeID).HasColumnName("EmployeeID");
			this.Property(t => t.RoleID).HasColumnName("RoleID");
			this.Property(t => t.IsDeleted).HasColumnName("IsDeleted");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreatStation).HasColumnName("CreatStation");
			this.Property(t => t.CreatTime).HasColumnName("CreatTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateSation).HasColumnName("UpdateSation");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
		}
	}
}

